<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/pages/base.js"></script>

    <link rel="stylesheet" href="/css/zTreeStyle.css" type="text/css">
    <script type="text/javascript" src="/js/jquery.ztree.core.min.js"></script>
    <script type="text/javascript" src="/js/jquery.ztree.excheck.js"></script>

</head>
<body>
<div id="app">
    <ul id="treeDemo" class="ztree"></ul>
</div>
<SCRIPT type="text/javascript">
    var setting = {
        check: {
            enable: true
        },
        data: {
            simpleData: {
                enable: true
            }
        }
    };

    new Vue({
        el:"#app",
        data:{

        },
        methods:{
            getPermissions(){
                axios.get('/permission/findPermission?roleId=1').then(resp=>{
                    let resultInfo = resp.data;
                    if (resultInfo.success){
                        $.fn.zTree.init($("#treeDemo"), setting, resultInfo.data);
                    }
                })
            }
        },
        created(){
            this.getPermissions();
        }
    });
</SCRIPT>


</body>
</html>